{{--radio组件用法
@ title label标题
@ class 类
@ name 上传的name名称
@ options 单元配置组，$title=>$value 标题和名称的键值对
@ value  通过判定键值获取是否选中状态
--}}
<div class="form-group {{$attributes['class']??''}}">
    <label for="{{$attributes['name']}} col-sm-2 col-form-label">{{$attributes['title']}}</label>
    <div class="input-group @error($attributes['name'])is-invalid @enderror">
        @foreach($attributes['options'] as $value=>$title)
            <div class="custom-control custom-radio custom-control-inline">
                <input
                    type="radio" value="{{$value}}"
                    id="{{$attributes['name'].$value}}"
                    name="{{$attributes['name']}}" class="form-check-input"
                    {{ isset($attributes['value']) && $value==$attributes['value']?'checked':''}}
                />
                <label for="{{$attributes['name'].$value}}">{{$title}}</label>
            </div>
        @endforeach
    </div>
    @error($attributes['name'])
    <strong class="form-text text-danger invalid-feedback">{{$message}}</strong>
    @enderror
</div>
